package com.vader.admin.entity.DO;

import cn.hutool.core.bean.BeanUtil;
import com.vader.admin.entity.Query.JoinGroupQuery;

import java.util.Date;
import java.io.Serializable;

/**
 * 组织用户关系表
(BaseGroupUserRelation)实体类
 *
 * @author Vader
 * @since 2021-10-06 12:46:39
 */
public class BaseGroupUserRelation implements Serializable {
    private static final long serialVersionUID = 859657371010976908L;
    /**
     * 雪花主键
     */
    private Long id;
    /**
     * 关联组织id
     */
    private Long gid;
    /**
     * 部门类型
     */
    private Integer groupType;
    /**
     * 父组织id
     */
    private Long parentGroupId;
    /**
     * 父组织类型
     */
    private Integer parentGroupType;
    /**
     * 关联用户id
     */
    private Long uid;
    /**
     * 用户类型
     */
    private Integer userType;
    
    private Date createTime;
    
    private Date updateTime;

    public static BaseGroupUserRelation from(JoinGroupQuery joinGroupQuery) {
        BaseGroupUserRelation baseGroupUserRelation = new BaseGroupUserRelation();
        BeanUtil.copyProperties(joinGroupQuery,baseGroupUserRelation);
        return baseGroupUserRelation;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGid() {
        return gid;
    }

    public void setGid(Long gid) {
        this.gid = gid;
    }

    public Integer getGroupType() {
        return groupType;
    }

    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }

    public Long getParentGroupId() {
        return parentGroupId;
    }

    public void setParentGroupId(Long parentGroupId) {
        this.parentGroupId = parentGroupId;
    }

    public Integer getParentGroupType() {
        return parentGroupType;
    }

    public void setParentGroupType(Integer parentGroupType) {
        this.parentGroupType = parentGroupType;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

}

